package com.bjdd.jdy.entity;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2017/4/13.
 */

public class ExamConfig {

    /**
     * configId : 1
     * count : 10
     * fullScore : 100.0
     * passScore : 60.0
     * pointScore : 10.0
     * genType : 1
     */

    private int configId;
    private int count;
    private double fullScore;
    private double passScore;
    private double pointScore;
    private int genType;

    public static ExamConfig objectFromData(String str) {

        return new Gson().fromJson(str, ExamConfig.class);
    }

    public static List<ExamConfig> arrayExamConfigFromData(String str) {

        Type listType = new TypeToken<ArrayList<ExamConfig>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public int getConfigId() {
        return configId;
    }

    public void setConfigId(int configId) {
        this.configId = configId;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public double getFullScore() {
        return fullScore;
    }

    public void setFullScore(double fullScore) {
        this.fullScore = fullScore;
    }

    public double getPassScore() {
        return passScore;
    }

    public void setPassScore(double passScore) {
        this.passScore = passScore;
    }

    public double getPointScore() {
        return pointScore;
    }

    public void setPointScore(double pointScore) {
        this.pointScore = pointScore;
    }

    public int getGenType() {
        return genType;
    }

    public void setGenType(int genType) {
        this.genType = genType;
    }
}
